﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TestProgress
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //for (int i = 0; i < 100; i++)
                //{

                //    System.Threading.Thread.Sleep(50);

                //    string persent = i + "%";

                //    Response.Write("<script>SetPorgressBar('" + i + "'); </script>");
                //    Response.Flush();
                //}
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 100; i++)
            {
                System.Threading.Thread.Sleep(50);

                string persent = i + "%";

                Response.Write("<script>SetPorgressBar('" + i + "'); </script>");
                Response.Flush();
            }
        }
    }
}